﻿<!DOCTYPE html>
<!--标准规范-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    
<div id="app" v-cloak>   
        <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
            style="margin-bottom: 15px;">
            <!--头部按钮-->
            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />标准规范列表</strong></div>
                    <span>
                        <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3" @click="onSubmit">
                        </btn>
                        <btn :text="col.btnExamine" imgsrc="/static/images/general.png" linetype="3"
                            @click="FileAudit('tj')"></btn>
                        <btn-export-list url="xxxx" :forminline="this.formInline" linetype="4"></btn-export-list>
                    </span>
                </el-col>
            </el-row>
            <!--头部查询选项-->
            <el-row>
                <!--文件级别-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{LawRegulationStandardSpecification.FileLeve+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.FileLeve" slot="suffix"
                                    :placeholder="LawRegulationStandardSpecification.FileLeve">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in FileLeve" :label="item.value" :value="item.key">
                                    </el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--法律法规名称-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.LawRegulationsName"
                                :placeholder="LawRegulationStandardSpecification.LawRegulationsName" size="mini">
                                <template slot="prepend">
                                    {{LawRegulationStandardSpecification.LawRegulationsName+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--备注-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.Remarks"
                                :placeholder="LawRegulationStandardSpecification.Remarks" size="mini">
                                <template slot="prepend">
                                    {{LawRegulationStandardSpecification.Remarks+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
        </el-form>
        <el-table stripe ref="table" :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight"
            border @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;">
            <!--复选框-->
            <el-table-column type="selection" style="padding-top: 0px;padding-bottom: 0px;" align="center" width="55"
                :reserve-selection="true">
            </el-table-column>
            <!--序号-->
            <el-table-column prop="id" :label="LawRegulationsTable.id" width="55">
            </el-table-column>
            <!--标准规范-->
            <el-table-column prop="StandardSpecification" :label="LawRegulationsTable.StandardSpecification"
                min-width="120" show-overflow-tooltip="true">
            </el-table-column>
            <!--文件级别-->
            <el-table-column prop="FileLeve" :label="LawRegulationsTable.FileLeve" min-width="120"
                show-overflow-tooltip="true">
            </el-table-column>
            <!--法律法规名称-->
            <el-table-column prop="LawRegulationsName" :label="LawRegulationsTable.LawRegulationsName" min-width="180"
                show-overflow-tooltip="true">
            </el-table-column>
            <!--发布主体-->
            <el-table-column prop="IssueSubject" :label="LawRegulationsTable.IssueSubject" min-width="150"
                show-overflow-tooltip="true">
            </el-table-column>
            <!--文号/标准号-->
            <el-table-column prop="Symbol" :label="LawRegulationsTable.Symbol" min-width="150"
                show-overflow-tooltip="true">
            </el-table-column>
            <!--颁布日期-->
            <el-table-column prop="IssueDate" :label="LawRegulationsTable.IssueDate" min-width="100">
            </el-table-column>
            <!--实施日期-->
            <el-table-column prop="ImplementationDate" :label="LawRegulationsTable.ImplementationDate" min-width="100">
            </el-table-column>
            <!--上传时间-->
            <el-table-column prop="UploadDate" :label="LawRegulationsTable.UploadDate" min-width="100">
            </el-table-column>
            <!--审核状态-->
            <el-table-column prop="AuditStatus" :label="LawRegulationsTable.AuditStatus" min-width="100">
            </el-table-column>
            <!--备注-->
            <el-table-column prop="Remarks" :label="LawRegulationsTable.Remarks" min-width="100">
            </el-table-column>
            <!--修改按钮--#注释#-->
            <!--<el-table-column width="53" prop="update" :label="col.btnUpdate" fixed="right">
                <template slot-scope="scope">
                    <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id)>
                        <i class="el-icon-edit"></i>
                    </button>
                </template>
            </el-table-column>-->
        </el-table>
        <!--分页-->
        <el-row type="flex" justify="end">
            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>
        </el-row>
        <!--弹出框--#注释#-->
        <!--<el-dialog title="用户信息管理" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
                   top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>-->
    </div>

    <script>
        var app = new Vue({
            el: '#app',
            data: {
                //表单内容
                ListItem: ListItem,
                //下拉列表
                FileLeve: [],
                //初始化数据
                formInline: {
                    model: { FileLeve: '', LawRegulationsName: '', Remarks: '' },
                    offset: 0,
                    limit: 10
                },
                currentRow: null,
                multipleSelection: []
            },
            mounted: function () {
                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
                //获取下拉菜单内容
                this.FileLeve = getDicData('65');
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/LawRegulationStandardSpecification/GetList') },
                //文件审核实现
                FileAudit: function () {
                    if (this.multipleSelection.length == 0) {
                        alert("请选择审核项！");
                    }
                    else {
                        var a = [];
                        var j = 0;
                        for (var i = 0; i < this.multipleSelection.length; i++) {
                            a = this.multipleSelection[i].AuditStatus;
                            console.log(a);
                            if (a == "已审核") {
                                j = j + 1;
                            } else {
                                console.log(j);
                                j = j;
                            }
                        }
                        if (j > 0) {
                            alert("存在已审核项,请检查");
                        } else {
                            alert("审核成功");
                        }

                    }
                    //console.log(a);
                },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
                //列表选择方法
                handleSelectionChange: function (val) { this.multipleSelection = val; },
                //导出--暂时此提示--之后跟官标实现
                FileExcel: function () {
                    myAjax("post", this, '/api/LawRegulationStandardSpecification/export', null,
                        function (response) {
                            console.log(response);
                            if (response.result == "Success") {
                                showMessage(response.message, 'success');
                            }
                            else {
                                showMessage(response.message, 'fail');
                            }

                        });
                },
            }
        })
    </script>
</body>

</html>